package xyz.wadewhy.basicstest.easyExcel

import com.alibaba.excel.annotation.ExcelProperty
import org.apache.commons.lang3.StringUtils
import java.util.*


/**
 *@ClassName ActiviteTeacherSkillRecords
 *@Description 业务用途
 *@Author zhongzihao
 *@Date 2022/1/5 2:56 下午
 *@Version 1.0
 **/


/**
 * json
 * @property topImage String
 * @property webTopImage String
 * @property videoUrl String
 * @property coursewareUrl String
 * @property webImages List<String>
 * @property images List<String>
 */
class ActivityTeacherRecommendRecordContent {
    //顶部图片，第一张
    var topImage: String = ""

    //web端顶部图片
    var webTopImage: String = ""

    //视频url
    var videoUrl: String = ""

    //en课件url
    var enCoursewareUrl: String = ""

    //ppt课件url
    var pptCoursewareUrl: String = ""

    //web端的切图
    var webImages: List<String> = emptyList()

    //切图数组
    var images: List<String> = emptyList()

    var qrCodeUrl: String = ""

    //非主题班会类型，有这个值
    var webDownImageUrl: String = ""

    //非主题班会类型，有这个值
    var downImageUrl: String = ""
}

class ActivityTeacherRecommendRecordContentVo {
    @ExcelProperty(index = 0)
    var recordId: String = ""

    //顶部图片，第一张
    @ExcelProperty(index = 1)
    var topImage: String = ""

    //web端顶部图片
    @ExcelProperty(index = 2)
    var webTopImage: String = ""

    //视频url
    @ExcelProperty(index = 3)
    var videoUrl: String = ""

    //en课件url
    @ExcelProperty(index = 4)
    var enCoursewareUrl: String = ""

    //ppt课件url
    @ExcelProperty(index = 5)
    var pptCoursewareUrl: String = ""

    //web端的切图
    @ExcelProperty(index = 6)
    var webImageList: String = ""

    var webImages: List<String> = if (StringUtils.isEmpty(webImageList)) emptyList() else webImageList.split(",")

    //切图数组
    @ExcelProperty(index = 7)
    var imageList: String = ""

    var images: List<String> = if (StringUtils.isEmpty(imageList)) emptyList() else imageList.split(",")

    //获得票数
    @ExcelProperty(index = 8)
    var votes: Int = 0

    //名字
    @ExcelProperty(index = 9)
    var teacherName: String = ""

    //组别0：班级教育故事；1：班级管理办法；2：主题班会设计 ActivityTeacherGroupEnum
    @ExcelProperty(index = 10)
    var group: Int = 0

    //头像
    @ExcelProperty(index = 11)
    var avatar: String = ""

    //作品标题
    @ExcelProperty(index = 12)
    var title: String = ""

    //背景图
    @ExcelProperty(index = 13)
    var coverImage: String = ""

    //web端背景图
    @ExcelProperty(index = 14)
    var webCoverImage: String = ""

    @ExcelProperty(index = 15)
    var qrCodeUrl: String = ""

    @ExcelProperty(index = 16)
    var downImageUrl: String = ""

    @ExcelProperty(index = 17)
    var webDownImageUrl: String = ""

}

class ActivityTeacherRecommendRecord {
    //对应ActiveTeacher的resourceId
    @ExcelProperty(index = 0)
    var recordId: String = ""

    //获得票数
    @ExcelProperty(index = 2)
    var votes: Int = 0

    //名字
    @ExcelProperty(index = 3)
    var teacherName: String = ""

    //组别0：班级教育故事；1：班级管理办法；2：主题班会设计 ActivityTeacherGroupEnum
    @ExcelProperty(index = 4)
    var group: Int = 0

    //头像
    @ExcelProperty(index = 5)
    var avatar: String = ""

    //作品标题
    @ExcelProperty(index = 6)
    var title: String = ""

    //背景图
    @ExcelProperty(index = 7)
    var coverImage: String = ""

    //web端背景图
    @ExcelProperty(index = 8)
    var webCoverImage: String = ""

    //JSON格式 ActivityTeacherRecommendRecordContent
    var content: String = ""

    //创建时间
    var createTime: Date = Date()

    //创建时间
    var updateTime: Date = Date()

    //删除状态
    var deleted: Boolean = false

    //版本状态
    var version: Int = 0
}